package com.anglireports.web.controller;

import com.anglireports.report.response.util.DateUtil;
import com.anglireports.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 下拉选项框
 * @author lvjilei
 * @ceateTime 2019/3/30.
 */
@Controller
public class ReportSelectController {

    private static final String MODEL = "/select/data";
    @Autowired
    private ReportService reportService;


    @RequestMapping(MODEL + "/campus")
    @ResponseBody
    public String angliCampusSelectData(String tokenid, String userid, String startdate, String enddate){
        return reportService.getSeclectCampusData(startdate, enddate);
    }

    @RequestMapping(MODEL + "/class")
    @ResponseBody
    public String angliCourseSelectData(String startdate, String enddate,
                                      String campusid,
                                      String org_code){
        return reportService.getSeclectClassData(startdate, enddate, campusid, org_code);
    }

    @RequestMapping(MODEL + "/student")
    @ResponseBody
    public String angliStudentSelectData(String tokenid, String userid, String startdate, String enddate,
                                       String courseid,
                                       Integer classid ){
        return reportService.getSeclectStudentData(startdate, enddate, courseid, classid);
    }
}
